from userinfo import *
user1 = UserInfo('张三',18)
user2 = UserInfo('李四',19)
user3 = UserInfo('王二',31)
user4 = UserInfo('麻子',55)
user5 = UserInfo('赵六',72)

set1 = {1,2,3,4,5,6,7,8,8,8,8};
set2 = {user1,user2,user3,user4,user5}
def func1():
	for x in set1:
	    print(x)
		#输出：
		#1
		#2
		#3
		#4
		#5
		#6
		#7
		#8
def func2():
	for x in set2:
	    print(x)
		#输出：
		#<userinfo.UserInfo object at 0x0000022472BEB6D8>
		#<userinfo.UserInfo object at 0x0000022472BEB908>
		#<userinfo.UserInfo object at 0x0000022472BEB710>
		#<userinfo.UserInfo object at 0x0000022472BEB748>
		#<userinfo.UserInfo object at 0x0000022472BEB780>
def func3():
	for x in set2:
	    print(x.name,x.age)
		#输出：
		#张三 18
		#赵六 72
		#李四 19
		#王二 31
		#麻子 55


func1()
func2()
func3()
